﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImportTemplate.aspx.cs" Inherits="ReportTemplate_ImportTemplate" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>月度专项统计指表入库</title>
    <base target="_self" />
    <link rel="stylesheet" href="../css/css.CSS" type="text/css" />
    <link href="../css/tab.css" type="text/css" rel="stylesheet" />

    <script language="javascript" type="text/javascript">
        function setdiv(id) {
            var divedit = document.getElementById("edittemplate");
            var divnew1 = document.getElementById("new1");
            var divnew2 = document.getElementById("new2");
            var divnew3 = document.getElementById("new3");
            if (id == "1") {
                divedit.style.display = "none";
                divnew1.style.display = "";
                divnew2.style.display = "";
                divnew3.style.display = "";
            }
            else {
                divedit.style.display = "";
                divnew1.style.display = "none";
                divnew2.style.display = "none";
                divnew3.style.display = "none";
            }
        }
        function save() {
            if (form1.rdType[0].checked)
                form1.hidType.value = "1";
            else
                form1.hidType.value = "2";
            form1.btn_Statistics.click();
        }
        function getmonth(obj) {
            if (obj.indexof("月度") >= 0) {
                
            } else { 
                
            }
        }
    </script>

</head>
<body style="background-image: url('../images/hit_bg.gif');">
    <% 
        Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
        Response.Expires = 0;
        Response.CacheControl = "no-cache";
    %>
    <form id="form1" runat="server" method="post" enctype="multipart/form-data">
    <table style="width: 98%;" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td valign="middle" style="height: 25; width: 100%;">
                <img id="imgIndicator" src="../images/Indicator.jpg" style="width: 21; height: 16;"
                    alt="当前位置" />当前位置：<asp:Label ID="Indicator" runat="server"></asp:Label>
            </td>
        </tr>
        <tr style="height: 1; background-color: #dddddd;">
            <td>
            </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#327AC6">
        <tr align="center" style="height: 26px;">
            <td style="background-color: #F9F9FB;" colspan="3">
                <font color="red">导入模板：选择各类型文件，分别从xls文件写入数据库模板，并进行实时校验。</font>
            </td>
        </tr>
        <tr style="height: 26px;">
            <td style="background-color: #F9F9FB;" colspan="3">
                [<strong>模板文件选择</strong>]
            </td>
        </tr>
        <tr style="background-color: #F9F9FB; height: 25;">
            <td align="right" style="width: 40%">
                <strong>模板类型：</strong>
            </td>
            <td>
                &nbsp;<input name="rdType" type="radio" value="1" onclick="setdiv(1)" checked="checked" />新增模板<input
                    name="rdType" type="radio" value="2" onclick="setdiv(2)" />修改模板
            </td>
        </tr>
        <tr id="edittemplate" style="background-color: #F9F9FB; height: 25; display: none">
            <td align="right" style="width: 40%">
                <strong>已入库模板：</strong>
            </td>
            <td>
                &nbsp;<asp:DropDownList ID="DDLType" runat="server" Width="110px">
                </asp:DropDownList>
                <span style="color: #ff0000">*</span>
            </td>
        </tr>
        <tr id="new1" style="background-color: #F9F9FB; height: 25;">
            <td align="right" style="width: 40%">
                <strong>表名（建议英文）：</strong>
            </td>
            <td>
                &nbsp;<asp:TextBox ID="txtTableName" runat="server" Width="110px"></asp:TextBox><span
                    style="color: #ff0000">*</span>
            </td>
        </tr>
        <tr id="new2" style="background-color: #F9F9FB; height: 25;">
            <td align="right" style="width: 40%">
                <strong>别名（建议中文）：</strong>
            </td>
            <td>
                &nbsp;<asp:TextBox ID="txtAlias" runat="server" Width="110px"></asp:TextBox><span
                    style="color: #ff0000">*</span>
            </td>
        </tr>
        <tr id="new3" style="background-color: #F9F9FB; height: 25;">
            <td align="right" style="width: 40%">
                &nbsp;<strong>表格类型：</strong>
            </td>
            <td>
                &nbsp;<select id="sltTableType" runat="server" style="width: 110px;">
                    <option value="">请选择...</option>
                    <option value="1">规则表格</option>
                    <option value="2">非规则表格</option>
                </select><span style="color: #ff0000">*</span>
            </td>
        </tr>
        <tr style="height: 26px">
            <td style="background-color: #F9F9FB;" colspan="3">
                <table style="width: 100%;" cellpadding="1" cellspacing="1">
                    <tr>
                        <td style="text-align: right;">
                            上传导入数据表：
                        </td>
                        <td>
                            <asp:FileUpload ID="FU_Statistics" runat="server" Width="300px" /><input id="btnSave"
                                onclick="save()" type="button" value="验证上传" class="button04" /><asp:Button ID="btn_Statistics"
                                    CssClass="button04" Width="0px" Height="0px" runat="server" Text="验证上传" OnClick="btn_Statistics_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center">
                            <asp:Label ID="Text_Confirm_Upstate" runat="server" Style="text-align: left;" BackColor="#FFFF80"
                                BorderColor="Red" BorderStyle="Dashed" BorderWidth="2px" Width="400px"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <input id="hidType" runat="server" type="hidden" />
    </form>
</body>
</html>
